﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Web_cuiki
{
    public class LoaiTaiLieuDTO
    {
      
        public int MaLoaiTaiLieu;



        public string TenLoai;

        public static LoaiTaiLieuDTO Convert(KIEU_SAN_PHAM kieuSP)
        {
            LoaiTaiLieuDTO loaiTL = new LoaiTaiLieuDTO();
            loaiTL.MaLoaiTaiLieu = kieuSP.MaKieuSanPham;
            loaiTL.TenLoai = kieuSP.TenKieuSanPham;
            return loaiTL;
        }
        public static List<LoaiTaiLieuDTO> ConvertList(List<KIEU_SAN_PHAM> kieuSP)
        {
            List<LoaiTaiLieuDTO> list = new List<LoaiTaiLieuDTO>();
            for (int i = 0; i < kieuSP.Count; i++)
            { 
                list.Add(Convert(kieuSP[i]));
            }
            return list;
        }
    }
}